
// 合同子表编码规则
import ctrtCodeRollBack from '../../request-functions/ctrtCodeRollBack';
// tableData 到rows 
export default async function(tableData) {
    
    const {contartNewCodeList} = this.state;
    let contartCodeList = []
    let contartCode = []
    // 选中的  或着 全部的
    if (tableData.length > 0) {
        contartCodeList = tableData.filter(item => contartNewCodeList.includes(item.values.contractnum.value))
        contartCode = contartCodeList.map(item => item.values.contractnum.value)
    }
  
    console.log(contartCode)
    let data = {
        codeList: contartCode
    }
    let res = await ctrtCodeRollBack(data)
    if (res.success) {

    }
    
}
